      SUBROUTINE SETUP
      RETURN
      END
C   HS35
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=9.D0-8.D0*X(1)-6.D0*X(2)-4.D0*X(3)+2.D0*(X(1)*(X(1)+X(2)+X(3))
     1   +X(2)**2)+X(3)**2
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      GRADF(1)=-8.D0+4.D0*X(1)+2.D0*(X(2)+X(3))
      GRADF(2)=-6.D0+4.D0*X(2)+2.D0*X(1)
      GRADF(3)=-4.D0+2.D0*(X(3)+X(1))
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GXI
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1      
      IF(I .GT. 1)      GOTO 100
       GXI=3.D0-X(1)-X(2)-2.D0*X(3)
       RETURN
  100  CONTINUE
      GXI=X(I-1)
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX) ,GRADGI(NX),A(3)
      SAVE A
      DATA A/2*-1.D0,-2.D0/
      IF ( GUNIT(1,I+NH) .EQ. 1 )RETURN
      CGRES(I+NH)=CGRES(I+NH)+1
      IF( I .GT. 1)      GOTO 200
      DO      100      J=1,3
      GRADGI(J)=A(J)
  100 CONTINUE
      RETURN
  200 CONTINUE
      DO      300      J=1,3
      GRADGI(J)=0.D0
  300 CONTINUE
      GRADGI(I-1)=1.D0
      RETURN
      END
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS35'/
      DATA X(1),X(2),X(3)/3*.50D0/
      DATA N/3/ , NH/0/ , NG/ 4/
      DATA DEL0/1.00D0/ ,TAU0/1.D0/ ,TAU/.1D0/
      DATA ((GUNIT(I,J),I=1,3),J=0,4)/-1,0,0,-1,0,0,
     F           1,1,1,1,2,1,1,3,1/
      END

